package servlet;

import java.io.*;
import java.net.*;

import javax.servlet.*;
import javax.servlet.http.*;

public class CancelarCarritoPedido extends HttpServlet {
    public void doGet(HttpServletRequest req, HttpServletResponse resp)
        throws ServletException, IOException {
        procesar(req, resp);
    }
    
    public void doPost(HttpServletRequest req, HttpServletResponse resp)
        throws ServletException, IOException {
        procesar(req, resp);
    }
    
    private void procesar(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        req.getSession().removeAttribute("carritoPedidos");
        req.getSession().removeAttribute("pedidoCliente");
        getServletContext().getRequestDispatcher("/Listado_Pedidos.jsp").forward(req, resp);
    } 
}